package device;

public class RouteConnect {
	public RouteConnect(String local, String peer) {
		localRouteAddr = local;
		peerRouteAddr = peer;
	}

	public int getRouteConnectID() {
		return routeConnectID;
	}

	@Override
	public boolean equals(Object o) {
		if (o instanceof RouteConnect) {
			RouteConnect rc = (RouteConnect) o;
			if (rc.getRouteConnectID() == routeConnectID
					|| (rc.localRouteAddr == localRouteAddr && rc.peerRouteAddr == peerRouteAddr)
					|| (rc.peerRouteAddr == localRouteAddr && rc.localRouteAddr == peerRouteAddr))
				return true;
		}
		return false;
	}

	public String localRouteAddr, peerRouteAddr;
	private int routeConnectID;
	private static int routeConnectNum = 0;
}
